package com.atguigu.gmall.publisher.service.impl;

import com.atguigu.gmall.publisher.bean.SubjectCommodityStats;
import com.atguigu.gmall.publisher.bean.SubjectOrderAmountPieGraph;
import com.atguigu.gmall.publisher.mapper.CommodityStatsMapper;
import com.atguigu.gmall.publisher.service.SubjectStatsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SubjectStatsServiceImpl implements SubjectStatsService {

    @Autowired
    private CommodityStatsMapper commodityStatsMapper;


    @Override
    public List<SubjectCommodityStats> getSubjectCommodityStatService(Integer date) {
        return commodityStatsMapper.selectSubjectStats(date);
    }

    @Override
    public List<SubjectOrderAmountPieGraph> getSubjectOrderAmountPieGraph(Integer date) {
        return commodityStatsMapper.selectSubAmtPieGra(date);
    }
}
